home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / serial / zyxel-1.5-s / zyxel-1 / rsynth-2.0-diffs < prev    next >
Text File  |  1994-11-21  |  9KB  |  316 lines

  1. diff -ur rsynth-2.0-orig/holmes.c rsynth-2.0/holmes.c
  2. --- rsynth-2.0-orig/holmes.c    Tue Nov  8 14:31:01 1994
  3. +++ rsynth-2.0/holmes.c    Sat Nov 12 22:22:38 1994
  4. @@ -47,11 +47,11 @@
  5.   }
  6.  filter_t, *filter_ptr;
  7.  
  8. -static float filter PROTO((filter_ptr p, Float v));
  9. +static inline float filter PROTO((filter_ptr p, Float v));
  10.  
  11.  static void jsru_save PROTO((double f0, float *tp));
  12.  
  13. -static float
  14. +static inline float
  15.  filter(p, v)
  16.  filter_ptr p;
  17.  Float v;
  18. @@ -65,9 +65,9 @@
  19.  
  20.   */
  21.  
  22. -static void set_trans PROTO((slope_t * t, Elm_ptr a, Elm_ptr b, int ext, int e));
  23. +static inline void set_trans PROTO((slope_t * t, Elm_ptr a, Elm_ptr b, int ext, int e));
  24.  
  25. -static void
  26. +static inline void
  27.  set_trans(t, a, b, ext, e)
  28.  slope_t *t;
  29.  Elm_ptr a;
  30. @@ -86,7 +86,7 @@
  31.    }
  32.  }
  33.  
  34. -static float linear PROTO((Float a, Float b, int t, int d));
  35. +static inline float linear PROTO((Float a, Float b, int t, int d));
  36.  
  37.  /*              
  38.     ______________ b
  39. @@ -98,7 +98,7 @@
  40.     ---------------t---------------
  41.   */
  42.  
  43. -static float
  44. +static inline float
  45.  linear(a, b, t, d)
  46.  Float a;
  47.  Float b;
  48. @@ -116,9 +116,9 @@
  49.    }
  50.  }
  51.  
  52. -static float interpolate PROTO((char *w, char *p, slope_t * s, slope_t * e, Float mid, int t, int d));
  53. +static inline float interpolate PROTO((char *w, char *p, slope_t * s, slope_t * e, Float mid, int t, int d));
  54.  
  55. -static float
  56. +static inline float
  57.  interpolate(w, p, s, e, mid, t, d)
  58.  char *w;
  59.  char *p;
  60. @@ -409,8 +409,8 @@
  61.    fclose(jsru_file);
  62.  }
  63.  
  64. -static int jsru_freq PROTO((Float f, Float base, Float inc));
  65. -static int
  66. +static inline int jsru_freq PROTO((Float f, Float base, Float inc));
  67. +static inline int
  68.  jsru_freq(f, base, inc)
  69.  Float f;
  70.  Float base;
  71. @@ -424,8 +424,8 @@
  72.   return i;
  73.  }
  74.  
  75. -static int jsru_amp PROTO((Float a));
  76. -static int
  77. +static inline int jsru_amp PROTO((Float a));
  78. +static inline int
  79.  jsru_amp(a)
  80.  Float a;
  81.  {
  82. diff -ur rsynth-2.0-orig/nsynth.c rsynth-2.0/nsynth.c
  83. --- rsynth-2.0-orig/nsynth.c    Tue Nov  8 14:31:05 1994
  84. +++ rsynth-2.0/nsynth.c    Sat Nov 12 22:22:39 1994
  85. @@ -275,18 +275,18 @@
  86.   "Gain0"
  87.  };
  88.  
  89. -static void flutter PROTO((klatt_global_ptr globals, klatt_frame_ptr pars));
  90. -static float resonator PROTO((resonator_ptr r, Float input));
  91. -static float antiresonator PROTO((resonator_ptr r, Float input));
  92. -static float impulsive_source PROTO((long nper));
  93. -static float natural_source PROTO((long nper));
  94. -static void setabc PROTO((long int f, long int bw, resonator_ptr rp));
  95. -static void setabcg PROTO((long int f, long int bw, resonator_ptr rp, Float gain));
  96. -static void setzeroabc PROTO((long int f, long int bw, resonator_ptr rp));
  97. -static float DBtoLIN PROTO((klatt_global_ptr globals, long int dB));
  98. -static float dBconvert PROTO((long int arg));
  99. -static void overload_warning PROTO((klatt_global_ptr globals, long int arg));
  100. -static short clip PROTO((klatt_global_ptr globals, Float input));
  101. +static inline void flutter PROTO((klatt_global_ptr globals, klatt_frame_ptr pars));
  102. +static inline float resonator PROTO((resonator_ptr r, Float input));
  103. +static inline float antiresonator PROTO((resonator_ptr r, Float input));
  104. +static inline float impulsive_source PROTO((long nper));
  105. +static inline float natural_source PROTO((long nper));
  106. +static inline void setabc PROTO((long int f, long int bw, resonator_ptr rp));
  107. +static inline void setabcg PROTO((long int f, long int bw, resonator_ptr rp, Float gain));
  108. +static inline void setzeroabc PROTO((long int f, long int bw, resonator_ptr rp));
  109. +static inline float DBtoLIN PROTO((klatt_global_ptr globals, long int dB));
  110. +static inline float dBconvert PROTO((long int arg));
  111. +static inline void overload_warning PROTO((klatt_global_ptr globals, long int arg));
  112. +static inline short clip PROTO((klatt_global_ptr globals, Float input));
  113.  static void pitch_synch_par_reset PROTO((klatt_global_ptr globals,
  114.                                           klatt_frame_ptr frame, long ns));
  115.  static void frame_init PROTO((klatt_global_ptr globals, klatt_frame_ptr frame));
  116. @@ -323,7 +323,7 @@
  117.     Flutter is added by applying a quasi-random element constructed from three
  118.     slowly varying sine waves.
  119.   */
  120. -static void
  121. +static inline void
  122.  flutter(globals, pars)
  123.  klatt_global_ptr globals;
  124.  klatt_frame_ptr pars;
  125. @@ -338,7 +338,7 @@
  126.   F0hz10 += (long) delta_f0;
  127.  }
  128.  
  129. -static float
  130. +static inline float
  131.  impulsive_source(nper)
  132.  long nper;
  133.  {
  134. @@ -362,7 +362,7 @@
  135.     spectral zero around 800 Hz, magic constants a,b reset pitch-synch
  136.   */
  137.  
  138. -static float
  139. +static inline float
  140.  natural_source(nper)
  141.  long nper;
  142.  {
  143. @@ -387,7 +387,7 @@
  144.  /* Convert formant freqencies and bandwidth into
  145.     resonator difference equation coefficents
  146.   */
  147. -static void
  148. +static inline void
  149.  setabc(f, bw, rp)
  150.  long int f;                       /* Frequency of resonator in Hz  */
  151.  long int bw;                      /* Bandwidth of resonator in Hz  */
  152. @@ -402,7 +402,7 @@
  153.  }
  154.  
  155.  /* Convienience function for setting parallel resonators with gain */
  156. -static void
  157. +static inline void
  158.  setabcg(f, bw, rp, gain)
  159.  long int f;                       /* Frequency of resonator in Hz  */
  160.  long int bw;                      /* Bandwidth of resonator in Hz  */
  161. @@ -416,7 +416,7 @@
  162.  /* Convert formant freqencies and bandwidth into
  163.   *      anti-resonator difference equation constants
  164.   */
  165. -static void
  166. +static inline void
  167.  setzeroabc(f, bw, rp)
  168.  long int f;                       /* Frequency of resonator in Hz  */
  169.  long int bw;                      /* Bandwidth of resonator in Hz  */
  170. @@ -433,7 +433,7 @@
  171.  
  172.  
  173.  /* Convert from decibels to a linear scale factor */
  174. -static float
  175. +static inline float
  176.  DBtoLIN(globals, dB)
  177.  klatt_global_ptr globals;
  178.  long int dB;
  179. @@ -454,7 +454,7 @@
  180.  #define ACOEF           0.005
  181.  #define BCOEF           (1.0 - ACOEF)    /* Slight decay to remove dc */
  182.  
  183. -static float
  184. +static inline float
  185.  dBconvert(arg)
  186.  long int arg;
  187.  {
  188. @@ -461,7 +461,7 @@
  189.   return 20.0 * log10((double) arg / 32767.0);
  190.  }
  191.  
  192. -static void
  193. +static inline void
  194.  overload_warning(globals, arg)
  195.  klatt_global_ptr globals;
  196.  long int arg;
  197. @@ -712,7 +712,7 @@
  198.   setabcg(0L, (long) globals->samrate, &rout, DBtoLIN(globals, Gain0));
  199.  }
  200.  
  201. -static short
  202. +static inline short
  203.  clip(globals, input)
  204.  klatt_global_ptr globals;
  205.  Float input;
  206. @@ -733,7 +733,7 @@
  207.  }
  208.  
  209.  /* Generic resonator function */
  210. -static float
  211. +static inline float
  212.  resonator(r, input)
  213.  resonator_ptr r;
  214.  Float input;
  215. @@ -751,7 +751,7 @@
  216.   */
  217.  /*  Output = (rnz.a * input) + (rnz.b * oldin1) + (rnz.c * oldin2) */
  218.  
  219. -static float
  220. +static inline float
  221.  antiresonator(r, input)
  222.  resonator_ptr r;
  223.  Float input;
  224. diff -ur rsynth-2.0-orig/phtoelm.c rsynth-2.0/phtoelm.c
  225. --- rsynth-2.0-orig/phtoelm.c    Tue Nov  8 14:31:08 1994
  226. +++ rsynth-2.0/phtoelm.c    Sat Nov 12 22:22:39 1994
  227. @@ -25,9 +25,9 @@
  228.  
  229.  trie_ptr phtoelm = NULL;
  230.  
  231. -static Elm_ptr find_elm PROTO((char *s));
  232. +static inline Elm_ptr find_elm PROTO((char *s));
  233.  
  234. -static Elm_ptr
  235. +static inline Elm_ptr
  236.  find_elm(s)
  237.  char *s;
  238.  {
  239. diff -ur rsynth-2.0-orig/say.c rsynth-2.0/say.c
  240. --- rsynth-2.0-orig/say.c    Tue Nov  8 14:31:15 1994
  241. +++ rsynth-2.0/say.c    Sat Nov 12 22:22:39 1994
  242. @@ -61,6 +61,7 @@
  243.  char *program = "say";
  244.  
  245.  static int verbose = 0;
  246. +static int realtime = 0;
  247.  
  248.  unsigned
  249.  spell_out(word, n, phone)
  250. @@ -69,6 +70,7 @@
  251.  darray_ptr phone;
  252.  {
  253.   unsigned nph = 0;
  254. + if (verbose)
  255.   fprintf(stderr, "Spelling '%.*s'\n", n, word);
  256.   while (n-- > 0)
  257.    {
  258. @@ -237,9 +239,10 @@
  259.       long value = 0;
  260.       if (sign < 0)
  261.        ch = *++s;
  262. -     while (isdigit(ch = *s))
  263. +     while (isdigit(ch = *s) || ch == ',')
  264.        {
  265. -       value = value * 10 + ch - '0';
  266. +       if (ch != ',')
  267. +        value = value * 10 + ch - '0';
  268.         s++;
  269.        }
  270.       if (ch == '.' && isdigit(s[1]))
  271. @@ -316,6 +319,11 @@
  272.      }
  273.     while (isspace(ch = *s))
  274.      s++;
  275. +   if (realtime && phone->items)
  276. +    {
  277. +     say_phones((char *) darray_find(phone, 0), phone->items, verbose);
  278. +     phone->items = 0;
  279. +    }
  280.    }
  281.   return nph;
  282.  }
  283. @@ -413,7 +422,10 @@
  284.   argc = init_holmes(argc, argv);
  285.   argc = dict_init(argc, argv);
  286.   argc = file_init(argc, argv);
  287. - argc = getargs("Misc",argc, argv, "v", NULL, &verbose, "Verbose, show phonetic form",NULL);
  288. + argc = getargs("Misc",argc, argv,
  289. +         "v", NULL, &verbose, "Verbose, show phonetic form",
  290. +        "R", NULL, &realtime, "Realtime, speak while analyzing",
  291. +        NULL);
  292.   if (help_only)
  293.    {
  294.     fprintf(stderr,"Usage: %s [options as above] words to say\n",program);
  295. diff -ur rsynth-2.0-orig/text.c rsynth-2.0/text.c
  296. --- rsynth-2.0-orig/text.c    Tue Nov  8 14:31:17 1994
  297. +++ rsynth-2.0/text.c    Sat Nov 12 22:22:39 1994
  298. @@ -51,7 +51,7 @@
  299.  typedef char *Rule[4];            /* A rule is four character pointers */
  300.  extern Rule *Rules[];             /* An array of pointers to rules */
  301.  
  302. -int
  303. +inline int
  304.  isvowel(chr)
  305.  int chr;
  306.  {
  307. @@ -59,7 +59,7 @@
  308.           chr == 'O' || chr == 'U');
  309.  }
  310.  
  311. -int
  312. +inline int
  313.  isconsonant(chr)
  314.  int chr;
  315.  {
  316.